{# Each Google account the bot joins calls as (an agent): who it is, whether its sign-in still works, the meetings it is in now, each opening in the Meetings drawer, its card in a call (its picture, else its initials, and its on/off settings: camera, answers anyone), and, with accounts here, who owns a meeting it joins from its calendar that nobody on the invite owns. One is made by signing it in. #} {% from "components/macros/feedback.html" import error_banner %} {% from "components/macros/form.html" import checkbox, file_button, select %} {% from "components/macros/layout.html" import card %} {% from "components/macros/table.html" import data_table %} {% macro in_now(meetings) -%} {%- for m in meetings -%} {{ m.label }}{{ ", " if not loop.last }} {%- else -%}-{%- endfor -%} {%- endmacro %} {% set redraw = 'hx-target="#overseer-meeting-agents" hx-select="#overseer-meeting-agents" hx-swap="outerHTML"' %} {% macro agent_card(cell) -%} {% set base = partials ~ "/agents/" ~ cell.agent %}
{% if cell.image %} {% else %}{{ cell.initials }}{% endif %}
{{ file_button("agent-image-" ~ cell.agent, "Change picture" if cell.image else "Add picture", cell.accept) }}
{% if cell.image %}{% endif %} {% for s in cell.switches %}
{{ checkbox("on", s.on, s.label, "1") }}
{% endfor %}
{%- endmacro %} {% macro default_owner(cell) -%}
{{ select("user_id", owners, selected=cell.id, blank="Nobody", attrs='data-default-owner="' ~ cell.agent ~ '"') }}
{%- endmacro %} {% set columns = [ {"key": "agent", "label": "Agent"}, {"key": "joins_as", "label": "Joins as"}, {"key": "email", "label": "Google account"}, {"key": "sign_in", "label": "Sign-in", "kind": "status"}, {"key": "in_now", "label": "In now", "render": in_now}, {"key": "card", "label": "In a call", "render": agent_card}, ] + ([{"key": "default_owner", "label": "Default owner", "render": default_owner}] if owners else []) %}
{% call card(None, id="overseer-meeting-agents") %} {% if error %}
{{ error_banner([error]) }}
{% endif %} {{ data_table(columns, rows, empty="No agents yet") }}

Sign one in, or add another: meetings login --agent <name>

{% endcall %}